package com.chenfan.process.entity.po;

import java.util.Date;

import com.baomidou.mybatisplus.annotation.TableName;

import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

/**
 * @author K
 * @date 2021-06-09
 */
@Builder
@NoArgsConstructor
@AllArgsConstructor
@Data
@TableName(value = "process_notify")
public class ProcessNotifyPo {

    public static final String STATUS = "status";

    private Long id;

    private Long approvalId;

    private Long approvalTemplateId;

    private Long approvalUserId;

    private String approvalUserName;

    private Integer status;

    private String remark;

    private Date createTime;

    private Date updateTime;

    public static ProcessNotifyPo ofDefault(Long approvalId, Long approvalTemplateId, Long approvalUserId, String approvalUserName) {
        ProcessNotifyPo processNotify = new ProcessNotifyPo();
        processNotify.setApprovalId(approvalId);
        processNotify.setApprovalTemplateId(approvalTemplateId);
        processNotify.setApprovalUserId(approvalUserId);
        processNotify.setApprovalUserName(approvalUserName);
        return processNotify;
    }
}
